<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('playerLists')}">玩家列表</a></li>
    </ul>
    <if condition="cmf_auth_check(cmf_get_current_admin_id(),'single/PlayerManage/loginGame')">
        <form class="search_form" method="get" target="_blank" action="{:url('loginGame')}">
            <div class="well form-inline margin-top-20">
                帐号：
                <input type="text" class="form-control" name="accname" style="width: 150px;"
                       value="{:input('request.accname/s','')}" placeholder="输入玩家登录帐号">
                <input type="submit" class="btn btn-warning" value="登录"/>
            </div>
        </form>
    </if>
    <form class="search_form" method="get" action="{:url('playerLists')}">
        <div class="well form-inline margin-top-20">
            角色名：
            <input type="text" class="form-control selector" name="nickname" style="width:150px;"
                   value="{:input('request.nickname/s','')}" data-action="selectName"
                   data-url="{:url('/admin/Ajax/getPlayerInfo')}" placeholder="输入玩家ID或角色名查询">
            帐号：
            <input type="text" class="form-control" name="accname" style="width: 150px;"
                   value="{:input('request.accname/s','')}" placeholder="输入玩家登录帐号">
            等级：
            <input type="number" class="form-control" name="min_lev" style="width: 80px;"
                   value="{:input('min_lev', 0)}"/>
            ~
            <input type="number" class="form-control" name="max_lev" style="width: 80px;"
                   value="{:input('max_lev', 10000)}"/>
            闯关：
            <input type="number" class="form-control" name="min_hook" style="width: 80px;"
                   value="{:input('min_hook', 0)}"/>
            ~
            <input type="number" class="form-control" name="max_hook" style="width: 80px;"
                   value="{:input('max_hook', 10000)}"/>
            <select name="online_flag" class="form-control">
                <option value="-1">-=是否在线=-</option>
                <option value="1"
                <eq name=":input('online_flag')" value="1">selected="selected"</eq>
                >在线</option>
                <option value="0"
                <eq name=":input('online_flag')" value="0">selected="selected"</eq>
                >离线</option>
            </select>
            注册时间：
            <input id="sDay" class="form-control js-date" style="width: 105px;" type="text" value="{:input('sDay')}"
                   name="sDay">
            ~
            <input id="eDay" class="form-control js-date" style="width: 105px;" type="text" value="{:input('eDay')}"
                   name="eDay">

            <select name="sortBy" class="form-control">
                <option value="-1">-=排序=-</option>
                <option value="1"
                <eq name=":input('ssortBy')" value="1">selected="selected"</eq>
                >等级升序</option>
                <option value="2"
                <eq name=":input('sortBy')" value="2">selected="selected"</eq>
                >等级降序</option>
                <option value="3"
                <eq name=":input('sortBy')" value="3">selected="selected"</eq>
                >战力升序</option>
                <option value="4"
                <eq name=":input('sortBy')" value="4">selected="selected"</eq>
                >战力降序</option>
                <option value="5"
                <eq name=":input('sortBy')" value="5">selected="selected"</eq>
                >关卡降序</option>
            </select>

            登录IP：
            <input type="text" class="form-control" name="login_ip" style="width: 120px;"
                   value="{:input('request.login_ip/s','')}">
            <input type="submit" class="btn btn-primary" value="搜索"/>
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>

                <th style="text-align: center; width: 10%;">玩家ID</th>
                <th style="text-align: center; width: 10%;">角色名</th>
                <th style="text-align: center; width: 10%;">帐号</th>
                <th style="text-align: center; width: 10%;">平台</th>
                <th style="text-align: center; width: 5%;">等级</th>
                <th style="text-align: center; width: 5%;">关卡</th>
                <th style="text-align: center; width: 5%;">在线</th>
                <th style="text-align: center; width: 5%;">性别</th>
                <th style="text-align: center; width: 5%;">仙玉</th>
                <th style="text-align: center; width: 5%;">战力</th>
                <th style="text-align: center; width: 5%;">充值</th>
                <th style="text-align: center; width: 10%;">注册时间</th>
                <th style="text-align: center; width: 10%;">登录时间</th>
                <th style="text-align: center; width: 10%;">登出时间</th>
                <th style="text-align: center; width: 8%;">登录IP</th>
                <th style="text-align: center; width: 10%;">操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="vo">
                <tr>
                    <td><a href="{:url('PlayerManage/playerInfo',array('role_id' => $vo['id']))}" target="_self">{$vo.id}</a>
                    </td>
                    <td><a href="{:url('PlayerManage/playerInfo',array('role_id' => $vo['id']))}" target="_self">{$vo.name}</a>
                    </td>
                    <td>{$vo['account']?? ""}</td>
                    <td>{$vo['pf']?? ""}</td>
                    <td>{$vo['lev']?? ""}</td>
                    <td>{$vo['cur_id']?? ""}</td>
                    <td>
                        <if condition="$vo['is_online'] eq 1">
                            <span style="color: #2ECC71;">在线</span>
                            <elseif condition="$vo['is_online'] eq 0"/>
                            <span style="color: #95A5A6">离线</span>
                            <else/>
                            {$vo['is_online']?? ""}
                        </if>
                    </td>
                    <td>
                        <if condition="$vo['sex'] eq 0">
                            <span style="color: #3498DB;">男</span>
                            <elseif condition="$vo['sex'] eq 1"/>
                            <span style="color: #E91E63;">女</span>
                            <else/>
                            {$vo['sex']?? ""}
                        </if>
                    </td>
                    <td>{$vo['gold']?? ""}</td>
                    <td>{$vo['fc']?? ""}</td>
                    <td>{$vo['rmb']?? ""}</td>
                    <td>{:date('Y-m-d H:i:s', $vo['reg_time'] ?? 0)}</td>
                    <td>{:date('Y-m-d H:i:s', $vo['last_login_time'] ?? 0)}</td>
                    <td>{:date('Y-m-d H:i:s', $vo['last_logout_time'] ?? 0)}</td>
                    <td>{$vo['last_login_ip']?? ""}</td>
                    <td>
                        <if condition="$vo['talk_lim_time'] GT time()">
                            <a class="btn btn-xs btn-success"
                               href="javascript:doForbidLock('free','{$vo.id}','{:url('PlayerManage/forbidTalk')}');">解禁</a>
                            <else/>
                            <a class="btn btn-xs btn-warning"
                               href="javascript:doForbidLock('forbid','{$vo.id}','{:url('PlayerManage/forbidTalk')}');">禁言</a>
                        </if>
                        <eq name="vo.state" value="1">
                            <a class="btn btn-xs btn-info"
                               href="javascript:doForbidLock('unlock','{$vo.id}','{:url('PlayerManage/forbidUser')}');">解封</a>
                            <else/>
                            <a class="btn btn-xs btn-danger"
                               href="javascript:doForbidLock('lock','{$vo.id}','{:url('PlayerManage/forbidUser')}');">封号</a>
                        </eq>

                        <if condition="cmf_auth_check(cmf_get_current_admin_id(),'single/PlayerManage/loginGame')">
                            <a class="btn btn-xs btn-primary" target="_blank"
                               href="{:url('loginGame',array('role_id' => $vo['id']))}">登录</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v=4"></script>
</body>
</html>